## -------------------------------------------------- #
## MarkowitzMcMahonFariss_JCR_README.txt
## -------------------------------------------------- #

 Date: 2018-08-16

 Authors: Jonathan N. Markowitz, R. Blake McMahon, and Christopher J. Fariss

 Title: Producing Goods and Projecting Power: How What You Make Influences What You Take

 Contact Information: 
   Christopher J. Fariss <cjf0006@gmail.com>

 Please note that the views expressed in this article are those of the authors and do not reflect the official policy  or position of the United States Air Force, Department of Defense, or the United States Government.

 Copyright (c) 2018, under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
 For more information see: http://creativecommons.org/licenses/by-nc-sa/3.0/us/
 All rights reserved. 
## -------------------------------------------------- #

	
## -------------------------------------------------- #
## install R and necessary packages for analysis
## -------------------------------------------------- #

open the .R file using any text or source code editor such as:
	TextEdit, emacs, Aquamacs, notepad++ , or Xpad

set the working directory to the folder containing the data files 

the set working directory command in R is setwd()
	type ?setwd for help documentation 

to set the path type into R: 

setwd("PATH_NAME")

where PATH_NAME is the path to the mail folder

install packages if necessary:
	packages <- c("foreign","rstan", "coda", "loo", "ggplot2", "gplots")
	install.packages(packages)

You should place the folders that contain this file and the additional folders it contains into the R working directory. 

The R working directory is available via the getwd() function in R.

The attached code makes use of the file structure. As long as the folders are in the R working directory the script will find these files and work properly. 

The last version of R and Mac OS-X are:

	R version 3.5.0 (2018-04-23) -- "Joy in Playing"
	Copyright (C) 2018 The R Foundation for Statistical Computing
	Platform: x86_64-apple-darwin15.6.0 (64-bit)

The rstan library will only install after the successful installation of STAN, which can be downloaded here: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started

## -------------------------------------------------- #
## Computer recommendations
## -------------------------------------------------- #

All models were estimated using R version 3.5 on a standard laptop or desktop computer. 


# ---------------------------------------------------------------------------------------------------- #
# file descriptions
# ---------------------------------------------------------------------------------------------------- #

econ_militarydata_10-2-2015.dta --- data for economic graphsMake_or_Take_3Oct2017.dta --- data for main analysesMakeorTake_Analysis_Result_Tables.R --- main analysesMakeorTake_PEC_Rplots.R --- economic graphsMakeorTake_rent_variables.R --- additional creation and generation of rent varabielsMasterDataset.RData --- data for rent varaible creation
analysis_10-30-2017_v2.do --- historic Stata do file. We originally estimated the models in Stata before converting them all into R code.

## -------------------------------------------------- #
## end of file
## -------------------------------------------------- #


